import {useTabs} from "./useTabs"
import { Tabs } from "antd-mobile"
import HomeList from "./components/HomeList"

const Home = () => {
  const {channels} = useTabs()
  return (
    <div className="tabContainer">
      <Tabs defaultActiveKey={'0'}>
        {channels.map(channel => <Tabs.Tab title={channel.name} key={channel.id}>
          <HomeList channel_id={'' + channel.id} />
        </Tabs.Tab>)}
      </Tabs>
    </div>
  )
}

export default Home